#include "stdafx.h"
#include "Common.h"
#include "DataAccess.h"

static CUser g_user;
static CSetting g_setting;


CUser*	GetCurUser()
{
    return &g_user;
}


void CUser::SetName(CString strName)
{
	m_strName = strName;
}

CString CUser::GetName()
{
	return m_strName;
}

CSetting* GetCurSetting()
{
    return &g_setting;
}


void CSetting::Init()
{
    GetDataAccess()->GetSetting(STR_SETTING_MAX_NUM, &m_maxNum);
}

void CSetting::SetMaxNum(int num)
{
    m_maxNum = num ;
    GetDataAccess()->SetSetting(STR_SETTING_MAX_NUM, m_maxNum);
}

void CUser::Log_in()
{

}

void CUser::Log_out()
{

}